package com.ufida.xfire;

import java.net.MalformedURLException;

import org.codehaus.xfire.client.XFireProxyFactory;
import org.codehaus.xfire.service.Service;
import org.codehaus.xfire.service.binding.ObjectServiceFactory;

import com.chanjet.mkp.outside.webservice.APIService;

public class FiCommonCaseServiceFactory {
private static APIService service;
	
	public static synchronized APIService getInstance() {
		if (service == null) {
			String url = "http://182.140.146.213/services/APIService";
			Service serviceModel = new ObjectServiceFactory().create(APIService.class);
			try {
				service = (APIService) new XFireProxyFactory().create(serviceModel, url);
			} catch (MalformedURLException e) {
				e.printStackTrace();
			}
		}
		return service;
	}
}
